import { FC } from 'react';
import AppRoutes from './routes';
import store from './store';
import { Provider } from 'react-redux';
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';
import 'antd-mobile';
dayjs.locale('zh-cn');

document.documentElement.setAttribute(
  'data-prefers-color-scheme',
  'dark'
)

const GlobalState: FC = () => {
  return (
    <AppRoutes />
  );
};

const App: FC = () => {
  return (
    <Provider store={store}>
      <GlobalState />
    </Provider>
  );
};

export default App;
